package cn.slipi.pan.web.mapper;

import cn.slipi.pan.web.entity.RecordEntity;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * mapper
 */
@Mapper
public interface RecordMapper extends BaseMapper<RecordEntity> {

    default List<RecordEntity> listAll() {
        return this.selectList(new LambdaQueryWrapper<>());
    }

    default int saveRecord(RecordEntity recordEntity) {
        return this.insert(recordEntity);
    }
}
